Feature: Bootstrapping
  Scenario: User wants help to get started
    Given a file named "ssh_config" with:
    """
    Host home
      StrictHostKeyChecking ask

    Host *.amazonaws.com
      StrictHostKeyChecking no
    """
    When I run `poet bootstrap --dir ./config.d`
    Then the exit status should be 0
    And a directory named "config.d" should exist
    And a file named "config.d/ssh_config" should exist
    And the file "config.d/ssh_config" should contain "Host home"
    And the file "ssh_config" should contain "# Generated by poet"

  Scenario: Bootstrapping a second time
    Given a file named "ssh_config" with:
    """
    Host home
      StrictHostKeyChecking ask

    Host *.amazonaws.com
      StrictHostKeyChecking no
    """
    When I run `poet bootstrap --dir ./config.d`
    Then the exit status should be 0
    When I run `poet bootstrap --dir ./config.d`
    Then the output from "poet bootstrap --dir ./config.d" should contain "You're already good to go"
    And the exit status should not be 0